﻿using System;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using ONETrace.Entities;

namespace ONETrace.Host
{
    public sealed class TraceItem
    {
        private readonly StringCollection _categories;

        public TraceItem()
        {
            _categories = new StringCollection();
        }

        public StringCollection Categories
        {
            get { return _categories; }
        }

        public Severity Severity { get; set; }

        public string Source { get; set; }

        public object View { get; set; }

        public DateTime TimeStamp { get; set; }

        public int Priority { get; set; }

        public int EventId { get; set; }

        public string ApplicationName { get; set; }

        public string ProcessName { get; set; }
    }

    public sealed class TraceItemCollection : ObservableCollection<TraceItem>
    {
        protected override void InsertItem(int index, TraceItem item)
        {
            base.InsertItem(0, item);
        }
    }
}